﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
    <title></title>
    <link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" type="text/css" />
    <script src="@Url.Content("~/Scripts/jquery-1.4.4.min.js")" type="text/javascript"></script>
@*    <script src="@Url.Content("~/Scripts/MicrosoftAjax.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/MicrosoftMvcAjax.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/MicrosoftMvcValidation.js")" type="text/javascript"></script>*@
    <script language="javascript" type="text/javascript">
        $(document).ready(function () {//页面加载后执行
            setSecreenSize(); //调整页面
            window.onresize = function () { setSecreenSize(); };  //屏幕大小改变时调整页面
        });

        function setSecreenSize() {//调整页面
            var screenHeight = getTotalHeight(); //获取浏览器可显示内容的高度
            var readerDivHeight = screenHeight - 75 - 29; //计算用于显示子页面(或左边菜单栏)的高度,75:顶部div的高度;29:底部的高度
            $("#divSubMenu").css("height", readerDivHeight); //设置左边菜单栏的高度
            $("#divContentPage").css("height", readerDivHeight - 20);

            var screenWidth = getTotalWidth(); //获取浏览器可显示内容的宽度
            var divSubMenuWidth = $("#divSubMenu").width(); //获取左边菜单的宽度
            var divContentPageWidth = screenWidth - divSubMenuWidth - 40; //计算显示子页面的宽度,20:解决ie9浏览器padding的bug
            $("#divContentPage").width(divContentPageWidth); //设置显示子页面的宽度
        }

        function getTotalHeight() {//获取浏览器可用于显示页面的高度
            if ($.browser.msie) {//如果浏览器是IE
                //如果是兼容性模式则用document.documentElement.clientHeight试获取
                return document.compatMode == "CSS1Compat" ? document.documentElement.clientHeight :
                         document.body.clientHeight;
            } else {//其它浏览器
                return self.innerHeight;
            }
        }

        function getTotalWidth() {//获取浏览器可用于显示页面的宽度

            if ($.browser.msie) {//如果浏览器是IE
                //如果是兼容性模式则用document.documentElement.clientWidth
                return document.compatMode == "CSS1Compat" ? document.documentElement.clientWidth :
                         document.body.clientWidth;
            } else {//其它浏览器
                return self.innerWidth;
            }
        }        
    </script>
</head>
<body>
    <div class="page">
        @*顶部区域*@
        <div id="divHeader">
            <div id="title">
                <table width="100%" border="0" cellpadding="0" cellspacing="0" background="@Url.Content("~/Content/Images/Top/m_03.gif")">
                    <tr>
                        <td width="339">
                            <img src="@Url.Content("~/Content/Images/Top/m_01.gif")" height="75" alt="" />
                        </td>
                        <td width="102" style="overflow: hidden;">
                            <img src="@Url.Content("~/Content/Images/Top/m_02.gif")" height="75" alt="" />
                        </td>
                        <td>
                            <table width="538" height="75" border="0" cellpadding="0" cellspacing="0">
                                <tr>
                                    <td width="538" align="center">
                                    </td>
                                </tr>
                                <tr>
                                    <td height="26" align="left">
                                        <table border="0" cellpadding="0" cellspacing="0">
                                            <tr>
                                                <td>
                                                    <a href="#">
                                                        <img src="@Url.Content("~/Content/Images/Top/m_08.gif")" alt="" border="0"/></a>
                                                </td>
                                                <td>
                                                    <a href="@Url.Content("~/User/Login")">
                                                        <img src="@Url.Content("~/Content/Images/Top/m_09.gif")" alt="" border="0"/></a>
                                                </td>
                                            </tr>
                                        </table>
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                </table>
            </div>
        </div>
        @*页面中间部分*@
        <div id="divCenter">
            @*菜单部分*@
            <div id="divSubMenu" class="divSubMenu">
                <div>
                    <img src="@Url.Content("~/Content/Images/LeftMenu/m_12.gif")" alt="" width="127" height="33" />
                </div>
                <div id="divTeacherMenu">
                    <table width='119' border='0' cellpadding='0' cellspacing='0'>
                       @* @if (ViewBag.PrivilegeList == null)
                        {
                            Response.Redirect(@Url.Content("~/User/UnAuthorized"));
                        }*@
                        @{
                            var privilegeListParent = (ViewBag.PrivilegeList as IList<ZDSoft.LMS.Domain.SystemFunction>).Where(m=>m.Parent == null).OrderBy(m=>m.Idx);
                            foreach (ZDSoft.LMS.Domain.SystemFunction function in privilegeListParent)
                            {
                            <tr class="menuRow">
                                <td align='center' class='Menu1'>
                                   @Html.ActionLink(function.SystemFunctionName, function.ActionName, function.ControllerName)                                   
                                </td>
                            </tr>
                                foreach (ZDSoft.LMS.Domain.SystemFunction item in function.Children)
                                {
                                <tr>
                                    <td align='center' class='Menu1'>
                                       @Html.ActionLink(item.SystemFunctionName, item.ActionName, item.ControllerName)                                   
                                    </td>
                                </tr>
                                }
                            }

                          }

                    </table>
                </div>
                <div style="clear: both;">
                </div>
            </div>
            @*显示子页面区域*@
            <div id="divContentPage">
                @RenderBody()
             </div>
            @*使父级div与最高的div等高*@
            <div style="clear: both;">
            </div>
        </div>
        @*页面底部*@
        <div id="divFooter">
            <div>
                正大软件学院 版权所有 2003-2013 All Right Reserved
            </div>
        </div>
    </div>
</body>
</html>
